<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
<title>Insert title here</title>
<%@include file="/commons/commonList.jsp" %>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">
	var noteId=null;
	var periodId= null;
    function noteSearch(){
    	setSearchStr();
   		document.noteSearchForm.submit();
    }

    function setSearchStr(){
    	parent.searchParam = $('noteSearchForm').serialize();
    }

    function openPrintAll(aObj){
		var parm = parent.searchParam;
		var url = "${ctx}/applets/appletShow.jsp?reportName=printChargeNoteService&" +  parm;
		aObj.href = url;
		aObj.target = "blank";
	}

	function setCurrentNote(id,currentPeriodId){
		noteId = id;
		periodId = currentPeriodId;
	}

	function openPrintSingleton(aObj){
		aObj.href = "${ctx}/applets/appletShow.jsp?reportName=printChargeNoteService&noteId=" + noteId+"&periodId="+periodId;
		aObj.target = "blank";
		aObj.click();
	}

	function printMeterdatas(aObj){
		aObj.href = "${ctx}/applets/appletShow.jsp?reportName=meterDatasList&noteId=" + noteId;
		aObj.target = "blank";
		aObj.click();
	}

	function openDetailPage(noteId){
		var url = "${ctx}/charge_noteAction.do?method=initNoteDetail&flag=0&noteId="+noteId;
   		top.windowOpen(url, "noteDetail", "详细资料", 580, 810,true,"noteDetailIfm");
   	}
</script>
</head>
<body>
 <div id="noteSearchDiv">
	 <form  id="noteSearchForm" name="noteSearchForm"
	  method="post" action="${ctx}/charge_noteAction.do?method=houseMainLinelist">
	  <input type="hidden" name="houseIds" value="${HouseIds}">
	  <input type="hidden" name="houseName" value="${noteVO.houseName}">
	 <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    <tr>
	    <td align="left" class="bg_toolBar">
	    <table width="100%" border="0" cellpadding="0" cellspacing="0"  >
	        <tr>
	        <td align="left" valign="middle" >
		    <table border="0" align="left" cellpadding="0" cellspacing="1" id="search01" >

				 <tr>
	             <td class="grid align_left">收费周期：</td>
	             <td class="td_search align_left">
	              	<pms:unitedSelect
	              		id="periodId1"
	              		name="periodId"
	              		optionLabel="period"
	              		optionValue="keyword"
	              		selectText="全部"
	              		dataList="${periodList}"
	              		style="width:90px;">
	              	</pms:unitedSelect>
	             </td>
		  		 <td class="td_search">通知单号：</td>
	             <td class="td_search"><input id="requisitionNum1" name="requisitionNum" type="text" class="inputtext" size="16" maxlength="40"></td>
	             <td class="td_search">通知单状态</td>
	             <td class="td_search">
	             	<select id="validity" name="validity" style="width:110px;">
	                 <option value="">全部</option>
	                 <option value="1">有效</option>
	                 <option value="0">无效</option>
	               </select>
	             </td>
			 	 <td class="td_search">
				 <table border="0" cellpadding="0" cellspacing="0" >
	                <tr><td class="buttonOffLeft" id="btn1_11"></td>
		                <td class="buttonOffMiddle"
		                	id="btn1_12"
		                	onblur="btn_change(1)"
		                	onclick="noteSearch();"
		                	onMouseOver="btn_change_over(1)"
		                	onMouseOut="btn_change_out(1)">
		                	<img src="${ctx}/images/ico_searchico.gif" alt="" border="0" align="absmiddle">${key.search}
		                  </td>
		                <td class="buttonOffRight" id="btn1_13"></td>
	                </tr>
	             </table></td>

		         </tr>
		     </table>
	        </td>
	        <td class="toolbarico" align="right">
					<a href="#" onFocus="this.blur()" onclick="openPrintAll(this);"><img src="${ctx}/images/ico_printer.gif" alt="打印预览" width="16" height="16" border="0" align="absbottom"></a>
				 </td>
	         </tr>
	     </table>
	     </tr>
	  </table>
	  </form>
  </div>
<div style="overflow:auto; height:240px;">
	<ec:ceTable items="noteList"
				autoIncludeParameters="true"
				var="noteItem"
				action="${ctx}/charge_noteAction.do?method=houseMainLinelist"
				rowsDisplayed="10"
				width="100%"
				view="pmsview"
				sortable="false"
				styleClass="gridData"
			>
		<ec:ceRow styleClass="grid" onclick="setCurrentNote('${noteItem.noteId }','${noteItem.periodId}')"
		     ondblclick="openDetailPage('${noteItem.noteId}');"
		     onContextMenu="return ShowContextMenu(event,'quick_rightmenu');">
			<ec:ceColumn property="period" headerCell="pmsHeadrCell"   width="15%" title="${key.charge_note_list_period}"/>
			<ec:ceColumn property="requisitionNum" headerCell="pmsHeadrCell" width="15%" title="${key.charge_note_list_noteNumber}"/>
			<ec:ceColumn property="totalAmt" headerCell="pmsHeadrCell"   width="10%" title="${key.charge_note_list_amt}"
						 styleClass="align_right"
						 headerOnmouseout="this.className='align_right'"
						 headerOnmouseover="this.className='grid_sort_on align_right'"/>
			<ec:ceColumn property="validityStr" headerCell="pmsHeadrCell"   width="10%" title="${key.charge_note_list_status}"/>
		</ec:ceRow>
		<ec:parameter name="houseIds" value="${noteVO.houseId}"></ec:parameter>
		<ec:parameter name="periodId" value="${noteVO.periodId}"></ec:parameter>
		<ec:parameter name="requisitionNum" value="${noteVO.requisitionNum}"></ec:parameter>
		<ec:parameter name="validity" value="${noteVO.validity}"></ec:parameter>
	</ec:ceTable>
</div>
<div id="quick_rightmenu" style="display:none;"  oncontextmenu="return false" class="quick_rightmenu" onMouseOver="MM_showHideLayers('quick_rightmenu')"  onMouseOut="MM_showHideLayers('quick_rightmenu')">
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">
	<tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
     	    <tr>
            <td class="quickMenu_toolbarico">
          	<a href="#" onclick="openPrintSingleton(this);" onFocus="this.blur()">
          		<img src="${ctx}/images/ico_printer.gif" alt="打印预览" width="16" height="16" border="0" align="absbottom">打印预览
          	</a>
            </td>
            </tr>
            <tr>
		   <td class="hrpading">
		       <table width="95%" border="0" align="left" cellpadding="0" cellspacing="0">
		     		<tr><td class="quickMenu_line"></td></tr>
		     	</table>
		   </td>
		</tr>
		<tr>
          <td class="quickMenu_toolbarico">
          	<a href="#" onclick="printMeterdatas(this);" onFocus="this.blur()">
          		<img src="${ctx}/images/ico_printer.gif" alt="走表数据明细" width="16" height="16" border="0" align="absbottom">走表数据明细
          	</a>
          </td>
        </tr>
      </table></td>
    </tr>
  </table>
  </div>
</body>
</html>